<template>
	<view class="zh-u-filter display-flex align-center" @click="handleClick">
		<text class="left"> {{ props.value }}</text>
		<view class="right display-flex flex-direction-column">
			<image v-show="props.sort == '1'" src="@/static/icons/top_triganle.png" class="triganle"/>
			<image v-show="props.sort == '0'" src="@/static/icons/bottom_triganle.png" class="triganle"/>
			<image v-show="props.sort == '-1'" src="@/static/icons/triganle.png" class="triganle"/>
		</view>
	</view>
</template>

<script setup lang="ts">
	const props = defineProps<{
		value?: string
		sort?: number
	}>()
	const emit = defineEmits(['click'])
	
	const handleClick = () => {
		emit('click')
	}
</script>

<style lang="scss" scoped>
	.zh-u-filter {
		.right {
			margin-left:7rpx;
			.triganle {
				width:12rpx;
				height: 21rpx;
			}
		}
	}
</style>